

package com.easyj.valid;


import javax.validation.constraints.*;

import com.easyj.base.validator.Scale;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


public class Student implements Serializable {


  private static final long serialVersionUID = 1L;
  private Long id;
  
  @NotNull(message = "班级不能为空")
  private Long classId;

  @NotBlank(message = "名字不能为空")
  private String name;
  
  @Size(min=2,message="")
  private List<String> projects;
  
  @Size(min = 6,max = 30,message = "地址应该在6-30字符之间")
  private String address;

  @DecimalMax(value = "100.00",message = "体重有些超标哦")
  @DecimalMin(value = "60.00",message = "多吃点饭吧")
  @Scale(value=2,message="2位小数")
  private BigDecimal weight;

  @Max(value=300,message = "最高300cm")
  private Integer height;
  
  private String friendName;
  
  @Future(message = "生日必须在当前实践之前")
  private Date birthday;

  @Email(message = "邮箱的格式不合法")
  private String email;


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public BigDecimal getWeight() {
    return weight;
  }

  public void setWeight(BigDecimal weight) {
    this.weight = weight;
  }

  public String getFriendName() {
    return friendName;
  }

  public void setFriendName(String friendName) {
    this.friendName = friendName;
  }

  public Date getBirthday() {
    return birthday;
  }

  public void setBirthday(Date birthday) {
    this.birthday = birthday;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public Long getClassId() {
		return classId;
	}
	
	public void setClassId(Long classId) {
		this.classId = classId;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}
  
  
}

